<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%><%@include file="/web/base/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<fieldset class="layui-elem-field">
		<legend>病人信息录入</legend>
		<div class="layui-field-box">
		<form class="layui-form">
						<div class="layui-form-item">
							<label class="layui-form-label">病人姓名</label>
							<div class="layui-inline">
								<input type="text" name="patientname" required lay-verify="required" placeholder="请输入病人名字" autocomplete="off"
									class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">病人性别</label>
							<div class="layui-inline">
								<input type="text" name="patientsex" required lay-verify="required" placeholder="请输入病人性别" autocomplete="off"
									class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">主治医生</label>
							<div class="layui-inline">
								<select name="doctorname" lay-filter="doctor" id="doctor">
									<option value="" selected>请选择主治医生</option>
      							</select>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">病房地址</label>
							<div class="layui-inline">
								<select name="roomaddress" lay-filter="room" id="room">
									<option value="" selected>请选择病房地址</option>
      							</select>
							</div>
						</div>

						
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="add">提交</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
						<input type="hidden" name="action" value="add"/>
		</form>
	</div>	
</fieldset>
	<script type="text/javascript">
		select();
		
		
		
		formon('submit(add)',base.app+'/PatientServlet','text',
				function(data2){
					if("1"==data2){
						alert("添加成功");
					}
					if("0"==data2){
						alert("添加失败");
					}
					if("2"==data2){
						alert("请输入数据");
					}
				})
	</script>
		
		
		
</body>
</html>